<?php
/* QQ:34734852
 * 业务联系：小鱼
 */
class Smtp{
	private $smtpadd, $loginmail, $loginpass, $pors;
	private $smtp = object;
	private $info = array();
	
	public function __construct( $C ) {
		$this -> Seting( $C );
	}
	
	public function Set( $C ) {
		$this -> Seting( $C );
	}
	
	private function Seting( $C ) {
		$this -> smtpadd   = $C['mailsmtp'];
		$this -> loginmail = $C['mailuser'];
		$this -> loginpass = $C['mailpass'];
		$this -> loginport = $C['mailport'];
	}
	
	
	public function send( $To = '', $Title = '', $Body = '' ) {
		if ( !$this -> smtplogin() ) {
			return $this -> info;
		} else {
			
		}
	}
	
	private function smtplogin(){
		$this -> smtp = fsockopen($this -> smtpadd, $thsi -> loginport, $errno, $error, 30 );
		set_socket_blocking( $this -> smtp, true );
		echo  fgets( $this -> smtp, 512 );
	}
	
}